
<div class="login-form align-center">
    <h2>Регистрация</h2>

    <form action="/registration" method="post">

        <div class="form-item">
            <label for="username" class="required">Логин</label>
            <div class="error autohide" style="display: <?= isset($this->form['errors']['username']) ? '' : 'none' ?>;"><?= isset($this->form['errors']['username']) ? $this->form['errors']['username'] : '' ?></div>
            <input type="text" id="username" name="username" required="required" value="<?= !empty($this->form['username']) ? $this->form['username'] : '' ?>">
        </div>

        <div class="form-item">
            <label for="email" class="required">Email</label>
            <div class="error autohide" style="display: <?= isset($this->form['errors']['email']) ? '' : 'none' ?>;"><?= isset($this->form['errors']['email']) ? $this->form['errors']['email'] : '' ?></div>
            <div class="form-notice-error">Неправильный адрес email</div>      
            <input type="email" id="email" name="email" required="required" value="<?= !empty($this->form['email']) ? $this->form['email'] : '' ?>">
        </div>   

        <div class="form-item">
            <label for="password" class="required">Пароль</label>
            <div class="error autohide" style="display: <?= isset($this->form['errors']['password']) ? '' : 'none' ?>;"><?= isset($this->form['errors']['password']) ? $this->form['errors']['password'] : '' ?></div>
            <div class="form-notice-medium">Хороший пароль</div>
            <div class="form-notice-ok">Очень хороший пароль</div>
            <div class="form-notice-error">Плохой пароль</div> 
            <input type="password" id="password" name="password" required="required">
        </div>  

        <div class="form-item">
            <label for="confirm_password" class="required">Повторите пароль</label>
            <div class="error autohide" style="display: <?= isset($this->form['errors']['confirm_password']) ? '' : 'none' ?>;"><?= isset($this->form['errors']['confirm_password']) ? $this->form['errors']['confirm_password'] : '' ?></div>
            <div class="form-notice-ok">Пароли совпадают</div>
            <div class="form-notice-error">Пароли не совпадают</div> 
            <input type="password" id="confirm_password" name="confirm_password" required="required">
        </div>   

        <a href="/login">Войти</a>
        <input type="submit" value="Регистрация" id="registration-submit" class="btn btn-success">
    </form>
</div>
